package dudghk;

import java.util.Scanner;

public class J02MyAge_쌤 {
	public static void main(String[] agrs){
		//1.변수 선언
		int birthYear;//생년월일
		int currentYear;//현재년도
		int age;//나이
		Scanner sc=null;
		
		
		//2. 생년입력, 나이계산
		sc=new Scanner(System.in);
		System.out.println("생년월일을 입력하세요");
		birthYear = sc.nextInt();
		System.out.println("현재년도를 입력하세요");
		currentYear = sc.nextInt();
		
		age =currentYear - birthYear +1;
		
		
		
		//3. 결과출력
	System.out.println(age);	
	}

}
